<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>页头</title>
  </head>
  
<body>
   <jsp:useBean id="user" class="entity.User" scope="session"></jsp:useBean>
     <c:if test="${empty user.username}">
     <jsp:forward page="login.jsp"></jsp:forward>
     </c:if>
    <font color='red'>欢迎</font> <jsp:getProperty property="username" name="user"/> <font color='red'>访问系统!  登录时间是：</font> 
    <jsp:getProperty property="loginTime" name="user"/><br>
  </body>
</html>
